DEFINITION MODULE MuiL{"muimaster.library",5}; (* note that version 5 is very old - if you need newer functions
                                                  test this! 
                                               *)

(*
** Modula-Interface for muimaster.library
**
** MUI (c) 1993/94 by Stefan Stuntz
**
** Modula-Interface done by Christian "Kochtopf" Scholz in 1993/94
**
** If you got problems please contact :
**
**  ruebe@pool.informatik.rwth-aachen.de
*)

IMPORT UD:UtilityD;
IMPORT R;
IMPORT MD:MuiD;
FROM SYSTEM     IMPORT ADDRESS;
FROM IntuitionD IMPORT IClassPtr, ObjectPtr, IDCMPFlagSet;
FROM GraphicsD  IMPORT TextFontPtr;
FROM ExecD      IMPORT LibraryPtr;
FROM MuiClasses IMPORT mCustomClass;

TYPE APTR       = ADDRESS;  (* for readability *)
TYPE StrPtr     = ADDRESS;
TYPE mImage     = ADDRESS;
TYPE mImageInfo = ADDRESS;
TYPE mCustomClassPtr = POINTER TO mCustomClass;

VAR  
     muiMasterVersion       : INTEGER;
     muiMasterBase          : LibraryPtr;

CONST
     muiMasterMinVersion    = 4;
     muiMasterName          = "muimaster.library";

PROCEDURE mNewObject 
            (class{R.A0}    : StrPtr;
             taglist{R.A1}  : UD.TagItemPtr) : APTR ; CODE -30;

PROCEDURE mDisposeObject
            (obj{R.A0}      : APTR); CODE -36;
 
PROCEDURE mRequestA 
            (app{R.D0}      : APTR;
             win{R.D1}      : APTR;
             flags{R.D2}    : LONGINT;
             title{R.A0}    : StrPtr;
             gadgets{R.A1}  : StrPtr;
             format{R.A2}   : StrPtr;
             params{R.A3}   : UD.TagItemPtr): LONGINT; CODE -42;


PROCEDURE mAllocAslRequest
            (reqtype{R.D0}  : LONGINT;
             taglist{R.A0}  : UD.TagItemPtr) : APTR; CODE -48;

PROCEDURE mAslRequest 
            (requester{R.A0}: APTR;
             taglist{R.A1}  : UD.TagItemPtr) : BOOLEAN; CODE -54;

PROCEDURE mFreeAslRequest 
            (requester{R.A0}: APTR); CODE -60;

PROCEDURE mError() : LONGINT; CODE -66;

PROCEDURE MakeObject
            (objtype{R.D0}      : LONGINT;
             params{R.A0}       : UD.TagItemPtr) : ObjectPtr; CODE -120;

(* functions to be used with custom classes *)

PROCEDURE moSetError
            (num{R.D0}      : LONGINT) : LONGINT; CODE -72;

PROCEDURE moGetClass
            (classname{R.A0}: StrPtr) : IClassPtr; CODE -78;

PROCEDURE moFreeClass
            (classptr{R.A0} : IClassPtr); CODE -84;


PROCEDURE moRequestIDCMP
            (obj{R.A0}      : ObjectPtr;
             flags{R.D0}    : IDCMPFlagSet); CODE -90;

PROCEDURE moRejectIDCMP
            (obj{R.A0}      : ObjectPtr;
             flags{R.D0}    : IDCMPFlagSet); CODE -96;

PROCEDURE moRedraw
            (obj{R.A0}      : ObjectPtr;
             flags{R.D0}    : LONGCARD) : APTR; CODE -102;

PROCEDURE moCreateCustomClass
            (base{R.A0}         : LibraryPtr;
             supername{R.A1}    : StrPtr;
             supermcc{R.A2}     : mCustomClassPtr;
             datasize{R.D0}     : LONGINT;
             dispatcher{R.A3}   : APTR) : mCustomClassPtr;  CODE -108;

PROCEDURE moDeleteCustomClass
            (mcc{R.A0}          : mCustomClassPtr) : BOOLEAN; CODE -114;



END MuiL.


